﻿using System;

namespace FootballProject.BL.BuisnessObjects
{
    public static class ResultDataConverter
    {
        public static Result Convert(string value)
        {
            switch (value)
            {
                case "H": 
                    return Result.HomeWin;
                case "A": 
                    return Result.AwayWin;
                case "D": 
                    return Result.Draw;
                default:
                    throw new ArgumentException("Can not resolve symbol " + value + " .");                    
            }
        }
        public static string Convert(Result value)
        {
            switch (value)
            {
                case Result.HomeWin:
                    return "H";
                case Result.AwayWin:
                    return "A";
                default:
                    return "D";
            }
        }
    }



    public enum Result
    {
        HomeWin,
        Draw,
        AwayWin
    }

}
